#include <iostream>
#include <unordered_set>
#include <vector>
using namespace std;

int k;
int t;
unordered_set<int> row_set;
unordered_set<int> col_set;
unordered_set<int> _45_set;
unordered_set<int> _135_set;
vector<pair<int, int>> queens;
int point = 0x3f3f3f;

int main()
{
    cin >> k;
    for (int i = 0, a, b; i < k; i++)
    {
        cin >> a >> b;
        queens.push_back(make_pair(a, b));
    }
    for (int i = 0; i < k; i++)
    {
        if (row_set.count(queens[i].first))
        {
            point = i + 1;
            break;
        }
        else
        {
            row_set.insert(queens[i].first);
        }
        if (col_set.count(queens[i].second))
        {
            point = i + 1;
            break;
        }
        else
        {
            col_set.insert(queens[i].second);
        }
        if (_45_set.count(queens[i].first - queens[i].second))
        {
            point = i + 1;
            break;
        }
        else
        {
            _45_set.insert(queens[i].first - queens[i].second);
        }
        if (_135_set.count(queens[i].first + queens[i].second))
        {
            point = i + 1;
            break;
        }
        else
        {
            _135_set.insert(queens[i].first + queens[i].second);
        }
    }
    cin >> t;
    int test[t];
    for(int i = 0; i < t; i++) cin >> test[i];
    for(int i = 0; i < t; i++)
    {
        if(test[i] < point) cout << "No" << endl;
        else cout << "Yes" << endl;
    }
    return 0;
}
